package com.itheima.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.health.pojo.CheckItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CheckItemMapper  extends BaseMapper<CheckItem> {
    @Select("SELECT tc.name " +
            "FROM t_checkgroup_checkitem tcc, t_checkitem tc " +
            "WHERE tcc.CHECKITEM_ID = tc.id " +
            "and tcc.CHECKGROUP_ID = #{gid}")
    List<CheckItem> findCheckItemByGroupId(@Param("gid") Integer gid);
}
